
abstract class Platform {
    bg;
    public button;
    public tap = false;
    public params = {
        devid: 6, devtype: 2, appid: "com.taoqi001.mp_marmot",
        appver: 301, token: "8bba0bcbdd4b6a768c90aa3cf4ea7283",
        trainid:"20056"
    };

    abstract init(bg);
      
    //from js to java/oc
    isFullScreen(): boolean {
        return true;
    }

    exchangeStar() {

    }

    tokenExpire() {

    }

    requestErr() { }

    loadSuccess() { }

    loadFail() { }

    enableBGM(): boolean {
        return true;
    }


    isSandbox():boolean{
        return false;
    }
    
    enableSound(): boolean {
        return true;
    }

    Wxpay(price:number){
        

    }

    Alipay(price:number){
        
        
    }

//     -(void)Wxpay:(NSInteger)priceNum;

// -(void)Alipay:(NSInteger)priceNum


    wxShareMessage(obj, callback: Function) {

    }

    setBGM() { }//ios特有方法


    //from java/oc to js
    refreshStar() {

        this.bg.refreCoinClick();

    }

    exit() { }


    getWeXinToken(callback: Function) {

    }

    getWeXinUserInfo(callUser: Function) {

    }

    setStorage(obj: Object) {

    }

    getStorage(key): any {

    }

    
    checkSession() { };//检查token
    
}
export = Platform;

